OCPBUGS-81745: [release-4.21] Honor AWS AMI override in NodePool token generation - #8170
Conversation
|
@bryan-cox: This pull request references Jira Issue OCPBUGS-81745, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request. The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…n generation Backport of openshift#7675 to release-4.21. The NewToken() function always called defaultNodePoolAMI() without checking if a user-specified AMI override was set via nodePool.Spec.Platform.AWS.AMI. This caused failures in AWS ISO (classified) regions where release image metadata may not contain region data, and users must specify a custom AMI. This fix checks for the AMI override before falling back to defaultNodePoolAMI(), and adds a nil check for StreamMetadata to prevent nil pointer dereference when stream metadata is unavailable.
7c9ffd7 to
9011e64
Compare
|
/lgtm |
|
/verified by @jiezhao16 |
|
@jiezhao16: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/test e2e-azure-aks-external-oidc |
|
@bryan-cox: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
b722bf6
into
openshift:release-4.21
|
@bryan-cox: Jira Issue Verification Checks: Jira Issue OCPBUGS-81745 Jira Issue OCPBUGS-81745 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Summary
Manual backport of #7675 to
release-4.21— the automated cherry-pick failed due to merge conflicts intoken.go.On
release-4.21, the karpenter label code was refactored to uset.userData.ami(computed inNewToken()), so the fix was adapted to check the AMI override inNewToken()rather than in the label-setting code path.Changes
nodePool.Spec.Platform.AWS.AMIbefore falling back todefaultNodePoolAMI()inNewToken()releaseImage.StreamMetadataindefaultNodePoolAMI()References